package com.autoTest.common;

import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2023-01-20
 * Time: 10:28
 */
public class Parameters {
    public String[] persons = new String[]{"李白","兰陵王","小乔","貂蝉","大桥","周瑜","孙悟空"};
    private String[] contents = {"新年快乐","万事如意","心想事成"};


    @Test
    public List<String> getPerson(){
        List<String> list = new ArrayList<>();
        //随机获取下标
        int index1 = (int)(Math.random()*(persons.length-1));
//        int index1 = persons.length-1;
//        System.out.println(index1);
        int index2 = (index1+1)%6;

        list.add(persons[index1]);
        list.add(persons[index2]);

        return list;
    }
    @Test
    public String getContent(){

        //随机获取下标
        int index = (int)(Math.random()*(contents.length-1));
//        int index1 = persons.length-1;
//        System.out.println(index1);
        return contents[index];
    }






}
